import React, { useState } from 'react'
import Progress from './Progress'
import './ProgressDetails.css'

const ProgressDetails = (props: any) => {
  const [progressDetails, setProgressDetails] = useState({
    id: props.id,
    time: props.progress.time,
    success: props.progress.success,
    milepost: props.progress.milepost,
  })

  return (
    <div>
      <div>
        <div className="leftDiv">项目进度</div>
        <div className="rightDiv">{progressDetails.time}</div>
      </div>
      <div>
        <Progress
          percent={progressDetails.success}
          themeColor="#6699FF"
          statusScope={progressDetails.milepost}
        />
      </div>
    </div>
  )
}

export default ProgressDetails
